import { createApp } from 'vue'
import { createPinia } from 'pinia'
// 数据持久化插件
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

import App from './App.vue'
import router from './router'

// 全局引入vant(引入所有vant组件)
// import vant from "vant"
import "vant/lib/index.css";

// 函数式组件的样式
// import 'vant/es/toast/style';
// import 'vant/es/dialog/style';
// import 'vant/es/notify/style';
// import 'vant/es/image-preview/style';

import "@/styles/index.scss"

const app = createApp(App)

// app.use(vant);
// app.use(createPinia())

const pinia = createPinia(); //创建pinia
pinia.use(piniaPluginPersistedstate); // pinia中使用数据持久化插件
app.use(pinia);

app.use(router);

app.mount('#app')
